<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-11-16
 * Time: 09:09
 */

namespace app\admin\controller\assess;


use app\common\controller\Backend;
use think\Route;

class Assess extends Backend
{
    public function test(){
        header('Access-Control-Allow-Origin:*');
        header('Access-Control-Allow-Methods:*');
        header('Access-Control-Allow-Headers:*');
        header('Access-Control-Allow-Credentials:false');
         $id=$this->request->request('id');
        $m=array();
        for ($x=0;$x<10;$x++){
            $return = array();
            $return['name']=$id.$x;
            $return['age']=24;
            $return['sex']='男';
            $return['num']=rand(10000, 99999);
            $return['xy']=rand(10000, 99999);
            $m[$x]=$return;
        }

        return json($m);
    }
    public function kyqq(){
        header('Access-Control-Allow-Origin:*');
        header('Access-Control-Allow-Methods:*');
        header('Access-Control-Allow-Headers:*');
        header('Access-Control-Allow-Credentials:false');
        $m=array();

        for ($x=0;$x<10;$x++){
            $return = array();
            $return['name']='张三'.$x;
            $return['age']=24;
            $return['sex']='男';
            $return['num']=rand(10000, 99999);
            $return['xy']=rand(10000, 99999);
            $m[$x]=$return;
        }
        return json($m);
    }
}